.class Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;
.super Ljava/lang/Object;
.source "ViewImage21.java"

# interfaces
.implements Landroid/view/View$OnTouchListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->a(Landroid/view/View;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field a:Z

.field b:Lcom/estrongs/android/pop/app/imageviewer/g;

.field final synthetic c:Landroid/view/View$OnTouchListener;

.field final synthetic d:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;


# direct methods
.method constructor <init>(Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;Landroid/view/View$OnTouchListener;)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->d:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    iput-object p2, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->c:Landroid/view/View$OnTouchListener;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 p1, 0x0

    .line 2
    iput-boolean p1, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->a:Z

    const/4 p1, 0x0

    .line 3
    iput-object p1, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->b:Lcom/estrongs/android/pop/app/imageviewer/g;

    return-void
.end method


# virtual methods
.method public onTouch(Landroid/view/View;Landroid/view/MotionEvent;)Z
    .locals 5

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->c:Landroid/view/View$OnTouchListener;

    invoke-interface {v0, p1, p2}, Landroid/view/View$OnTouchListener;->onTouch(Landroid/view/View;Landroid/view/MotionEvent;)Z

    .line 2
    invoke-virtual {p2}, Landroid/view/MotionEvent;->getPointerCount()I

    move-result p1

    const/4 v0, 0x1

    if-le p1, v0, :cond_1

    .line 3
    iget-object p1, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->d:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    invoke-static {p1}, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->s(Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;)Landroid/view/ScaleGestureDetector;

    move-result-object p1

    if-nez p1, :cond_0

    .line 4
    iget-object p1, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->d:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    new-instance v1, Landroid/view/ScaleGestureDetector;

    iget-object v2, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->d:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    new-instance v3, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$i0;

    iget-object v4, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->d:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    iget-object v4, v4, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->p:Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;

    invoke-direct {v3, v4}, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$i0;-><init>(Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;)V

    invoke-direct {v1, v2, v3}, Landroid/view/ScaleGestureDetector;-><init>(Landroid/content/Context;Landroid/view/ScaleGestureDetector$OnScaleGestureListener;)V

    invoke-static {p1, v1}, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->a(Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;Landroid/view/ScaleGestureDetector;)Landroid/view/ScaleGestureDetector;

    .line 5
    :cond_0
    iget-object p1, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->d:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    invoke-static {p1}, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->s(Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;)Landroid/view/ScaleGestureDetector;

    move-result-object p1

    invoke-virtual {p1, p2}, Landroid/view/ScaleGestureDetector;->onTouchEvent(Landroid/view/MotionEvent;)Z

    goto :goto_2

    .line 6
    :cond_1
    iget-object p1, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->d:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    iget-object p1, p1, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->p:Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;

    if-eqz p1, :cond_5

    .line 7
    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/imageviewer/e;->getScale()F

    move-result p1

    iget-object v1, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->d:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    iget-object v1, v1, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->p:Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;

    invoke-virtual {v1}, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->getDefaultScale()F

    move-result v1

    cmpg-float p1, p1, v1

    if-lez p1, :cond_5

    iget-object p1, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->d:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    iget-object p1, p1, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->p:Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;

    .line 8
    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->getScaledWidth()I

    move-result p1

    iget-object v1, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->d:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    iget-object v2, v1, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->D:Landroid/util/DisplayMetrics;

    iget v2, v2, Landroid/util/DisplayMetrics;->widthPixels:I

    if-gt p1, v2, :cond_2

    iget-object p1, v1, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->p:Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;

    .line 9
    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->getScaledHeight()I

    move-result p1

    iget-object v1, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->d:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    iget-object v1, v1, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->D:Landroid/util/DisplayMetrics;

    iget v1, v1, Landroid/util/DisplayMetrics;->heightPixels:I

    if-le p1, v1, :cond_5

    :cond_2
    iget-boolean p1, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->a:Z

    if-eqz p1, :cond_3

    goto :goto_0

    .line 10
    :cond_3
    iget-object p1, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->b:Lcom/estrongs/android/pop/app/imageviewer/g;

    if-nez p1, :cond_4

    .line 11
    new-instance p1, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w$a;

    invoke-direct {p1, p0, p2}, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w$a;-><init>(Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;Landroid/view/MotionEvent;)V

    iput-object p1, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->b:Lcom/estrongs/android/pop/app/imageviewer/g;

    .line 12
    :cond_4
    iget-object p1, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->d:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    iget-object p1, p1, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->p:Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;

    iget-object v1, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->b:Lcom/estrongs/android/pop/app/imageviewer/g;

    invoke-virtual {p1, v1}, Lcom/estrongs/android/pop/app/imageviewer/ImageViewTouch;->setOnImageEdgeDetector(Lcom/estrongs/android/pop/app/imageviewer/g;)V

    goto :goto_1

    .line 13
    :cond_5
    :goto_0
    iget-object p1, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->d:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    iget-object p1, p1, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->B:Lcom/estrongs/android/widget/RealViewSwitcher;

    invoke-virtual {p1, p2}, Lcom/estrongs/android/widget/RealViewSwitcher;->onTouchEvent(Landroid/view/MotionEvent;)Z

    .line 14
    :goto_1
    iget-boolean p1, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->a:Z

    if-eqz p1, :cond_6

    .line 15
    invoke-virtual {p2}, Landroid/view/MotionEvent;->getAction()I

    move-result p1

    if-ne p1, v0, :cond_6

    .line 16
    iget-object p1, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->d:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    iget-object p1, p1, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->B:Lcom/estrongs/android/widget/RealViewSwitcher;

    invoke-virtual {p1}, Lcom/estrongs/android/widget/RealViewSwitcher;->g()V

    const/4 p1, 0x0

    .line 17
    iput-boolean p1, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->a:Z

    .line 18
    :cond_6
    iget-object p1, p0, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21$w;->d:Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    iget-object p1, p1, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;->o:Landroid/view/GestureDetector;

    invoke-virtual {p1, p2}, Landroid/view/GestureDetector;->onTouchEvent(Landroid/view/MotionEvent;)Z

    :goto_2
    return v0
.end method
